home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 1996 February / Software of the Month Club 1996 February.iso / pc / os2 / pmsatsw / install.cmd < prev    next >
Encoding:
Text File  |  1996-01-08  |  5.6 KB  |  172 lines

  1. /*
  2.  * PM Satellite/2 1.0 installation program copyright (c) Fredrik Ax 1995
  3.  *
  4.  * This program creates program objects for the files "pmsatsw.exe",
  5.  * (Shareware version of PM Satellite/2), "shellsat.exe" (Shell Satellite) and
  6.  * "pmsat.exe" (registered version) if the files exists.
  7.  */
  8.  
  9. '@Echo off'
  10. 'cls'
  11.  
  12. say'     ┌───────────────────────────────────────────────────────────────────┐'
  13. say'     │            PM Satellite/2 1.0 Installation Program                │'
  14. say'     │      PM Satellite/2 is copyrighted (c) 1995 by Fredrik Ax         │'
  15. say'     │                      All rights reserved                          │'
  16. say'     ├───────────────────────────────────────────────────────────────────┤'
  17. say'     ├───────────────────────────────────────────────────────────────────┤'
  18. say'     │              Have you read the README.OS2 file yet?               │'
  19. say'     │       It tells you how to install, so you should read it.         │'
  20. say'     └───────────────────────────────────────────────────────────────────┘'
  21.  
  22.  
  23. /* tell user what we're doing, give him a chance to hit CTRL-C */
  24.  
  25. say ''
  26. say 'This program creates objects for PM Satellite/2 (shareware and registered'
  27. say 'version) and Shell Satellite.'
  28. say ''
  29.  
  30. /* load rexx utility functions */
  31.  
  32. call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  33. call SysLoadFuncs
  34.  
  35. /* NOTE:  remove following 6 lines for unattended use... */
  36. call charout ,'  Press [Enter] to continue...'
  37. dummy = ''
  38. do until dummy = '0d'x
  39.   dummy = SysGetKey('NOECHO')
  40. end
  41. call charout ,'0d1b'x'[K'
  42.  
  43. /* save current directory */
  44. curdir = directory()
  45.  
  46. /* create folder */
  47. title = "Satellite/2"
  48. classname = 'WPFolder'
  49. location = '<WP_DESKTOP>'
  50. setup = 'OBJECTID=<SAT_Folder>;OPEN=DEFAULT'
  51. result = SysCreateObject(classname,title,location,setup,f)
  52.  
  53. /* create program object for "pmsat.exe" */
  54. rc = stream('pmsat.exe','c','query exists')
  55. if rc \= '' then
  56. do
  57.   title = "PM Satellite/2"
  58.   classname = 'WPProgram'
  59.   location = '<SAT_Folder>'
  60.   setup = 'EXENAME='curdir'\pmsat.exe;STARTUPDIR='curdir
  61.   if existed = '' then setup = setup';PARAMETERS='
  62.   call SysCreateObject classname,title,location,setup,u
  63. end
  64. else
  65.   say "Can't find "pmsat.exe" (Registered version)."
  66.  
  67. /* create program object for "pmsatsw.exe" */
  68. rc = stream('pmsatsw.exe','c','query exists')
  69. if rc \= '' then
  70. do
  71.   title = "PM Satellite/2 ShareWare version"
  72.   classname = 'WPProgram'
  73.   location = '<SAT_Folder>'
  74.   setup = 'EXENAME='curdir'\pmsatsw.exe;STARTUPDIR='curdir
  75.   if existed = '' then setup = setup';PARAMETERS='
  76.   call SysCreateObject classname,title,location,setup,u
  77. end
  78. else
  79.   say "Can't find "pmsatsw.exe" (Unregistered version)."
  80.  
  81. /* create program object for "shellsat.exe" */
  82. rc = stream('shellsat.exe','c','query exists')
  83. if rc \= '' then
  84. do
  85.   title = "Shell Satellite"
  86.   classname = 'WPProgram'
  87.   location = '<SAT_Folder>'
  88.   setup = 'EXENAME=CMD.EXE;STARTUPDIR='curdir';PARAMETERS= /c "mode 100 40 & 'curdir'\shellsat.exe"'
  89.   call SysCreateObject classname,title,location,setup,u
  90. end
  91. else
  92.   say "Can't find "shellsat.exe"."
  93.  
  94. /* create program object for "register.txt" */
  95. rc = stream('register.txt','c','query exists')
  96. if rc \= '' then
  97. do
  98.   title = "Register.TXT"
  99.   classname = 'WPShadow'
  100.   location = '<SAT_Folder>'
  101.   setup = 'SHADOWID='rc
  102.   call SysCreateObject classname,title,location,setup,u
  103. end
  104. else
  105.   say "Can't find "register.txt"."
  106.  
  107. /* create program object for "register.frm" */
  108. rc = stream('register.frm','c','query exists')
  109. if rc \= '' then
  110. do
  111.   title = "Register.FRM"
  112.   classname = 'WPShadow'
  113.   location = '<SAT_Folder>'
  114.   setup = 'SHADOWID='rc
  115.   call SysCreateObject classname,title,location,setup,u
  116. end
  117. else
  118.   say "Can't find "register.frm"."
  119.  
  120. /* create program object for "README.OS2" */
  121. rc = stream('README.OS2','c','query exists')
  122. if rc \= '' then
  123. do
  124.   title = "ReadMe.OS2"
  125.   classname = 'WPShadow'
  126.   location = '<SAT_Folder>'
  127.   setup = 'SHADOWID='rc
  128.   call SysCreateObject classname,title,location,setup,u
  129. end
  130. else
  131.   say "Can't find "README.OS2"."
  132.  
  133. /* create program object for "pmsat.inf" */
  134. rc = stream('pmsat.inf','c','query exists')
  135. if rc \= '' then
  136. do
  137.   if assocfilter \= '' then assocfilter=';ASSOCFILTER=*.INF'
  138.   title = "PM Satellite/2 Online Help"
  139.   classname = 'WPProgram'
  140.   location = '<SAT_Folder>'
  141.   setup = 'EXENAME=VIEW.EXE;STARTUPDIR='curdir';PARAMETERS='curdir'\pmsat.inf'
  142.   call SysCreateObject classname,title,location,setup,u
  143. end
  144. else
  145.   say "Can't find "pmsat.inf"."
  146.  
  147. /* create program object for "LICENSE.INF" */
  148. rc = stream('LICENSE.INF','c','query exists')
  149. if rc \= '' then
  150. do
  151.   if assocfilter \= '' then assocfilter=';ASSOCFILTER=*.INF'
  152.   title = "License agreement for PM Satellite/2 "
  153.   classname = 'WPProgram'
  154.   location = '<SAT_Folder>'
  155.   setup = 'EXENAME=VIEW.EXE;STARTUPDIR='curdir';PARAMETERS='curdir'\LICENSE.INF "License agreement for PM Satellite/2"'
  156.   call SysCreateObject classname,title,location,setup,u
  157. end
  158. else
  159.   say "Can't find "LICENSE.INF"."
  160.  
  161. /* Final words */
  162. say '┌─────────────────────────────────────────────────────────────────────┐'
  163. say '│ Finaly I want to thank M. Kimes which "INSTALL.CMD" that comes with │'
  164. say '│   his execellent FM/2 have helped me alot in making this file :-)   │'
  165. say '├─────────────────────────────────────────────────────────────────────┤'
  166. say '│    To move PM Satellite/2 to another directory, move the files,     │'
  167. say '│       delete the PM Satellite/2 folder, then rerun INSTALL.         │'
  168. say '└─────────────────────────────────────────────────────────────────────┘'
  169. say "I'm done now."
  170. say ''
  171.  
  172.